   /*-----------------------------------------------------------.
  /                      Choose effects                         /
  '-----------------------------------------------------------*/
// Effects are listed in the order that they are applied.
// Set to 1 for ON or 0 for OFF
#define USE_AMBIENTOCCLUSION		0		//[0 or 1] Ambient Occlusion: Enables physically incorrect shading that most newer gen games use. Multiple algorithms available.
#define USE_DEPTHOFFIELD		0		//[0 or 1] Depth of Field: Simulates out of focus blur of a camera. Multiple algorithms available.
#define USE_HEATHAZE 			0		//[0 or 1] Heat Haze: Convection in heated air causes the temperature of the air to vary and causes a shimmery effect that distorts whatever is behind.
#define USE_FISHEYE_CA			0		//[0 or 1] Fisheye lens & Chromatic Abberation: Adds some RGB shift in colors and distorts image to look like the "fisheye" effect.

#define HDR_MODE			0		//[0 to 2] HDR Level: Rendering bitrate. 0: RGBA8 | 1: RGBA16F | 2: RGBA32F

/*==============================================================================*/

//AMBIENT OCCLUSION - GLOBAL PARAMETERS
#define AO_METHOD			3		//[1 to 4] 1: SSAO | 2: Raymarch AO | 3: HBAO | 4: SSGI
#define AO_SHARPNESS			0.7		//[0.05 to 2.0] 1: AO sharpness, higher means more sharp geometry edges but noisier AO, less means smoother AO but blurry in the distance.
#define AO_DEBUG			0		//[0 to 2] Enables raw debug output. 1: occlusion | 2: color bouncing (SSGI only!)
#define AO_LUMINANCE_CONSIDERATION	1		//[0 or 1] Enables dampening of AO intensity on bright pixels, to preserve bright light sprites or beter lit areas. Not for GI!
#define AO_LUMINANCE_LOWER		0.3		//[0.0 to 1.0] Lower brightness threshold where AO starts to fade out. Below this threshold AO has full power.
#define AO_LUMINANCE_UPPER		0.6		//[0.0 to 1.0] Upper brightness threshold where AO starts to fade out. Above this threshold AO is 0.

//AMBIENT OCCLUSION - SSAO
#define iSSAOSamples   			16		//[32 to 128] Amount of samples. Don't set too high or shader compilation time goes through the roof.
#define fSSAOSamplingRange		50.0		//[10.0 to 50.0] SSAO sampling range. High range values might need more samples so raise both.
#define fSSAODarkeningAmount 		1.5		//[0.0 to 5.0] Amount of SSAO corner darkening
#define fSSAOBrighteningAmount  	1.0		//[0.0 to 5.0] Amount of SSAO edge brightening

//AMBIENT OCCLUSION - RAYMARCH AO
#define iRayAOSamples   		24		//[10 to 78] Amount of sample "rays" Higher means more accurate AO but also less performance.
#define fRayAOSamplingRange   		0.0005		//[0.0001 to 0.02] Range of AO sampling. Higher values ignore small geometry details and shadow more globally.
#define fRayAOMaxDepth  		0.02		//[0.01 to 0.2] Range clip factor to avoid far objects to occlude close objects just because they are besides each other on screen.
#define fRayAOMinDepth 			0.00003		//[0.000 to 0.001] Minimum depth difference cutoff to prevent (almost) flat surfaces to occlude themselves.
#define fRayAOPower			2.0		//[0.2 to 5.0] Amount of darkening.

//AMBIENT OCCLUSION - HBAO
#define iHBAOSamples			9		//[7 to 36] Amount of samples. Higher means more accurate AO but also less performance.
#define fHBAOSamplingRange		2.6		//[0.5 to 5.0] Range of HBAO sampling. Higher values ignore small geometry details and shadow more globally.
#define fHBAOAmount			3.0		//[1.0 to 10.0] Amount of HBAO shadowing.
#define fHBAOClamp			0.1		//[0.0 to 1.0] Clamps HBAO power. 0.0 means full power, 1.0 means no HBAO.
#define fHBAOAttenuation		0.02		//[0.001 to 0.2] Affects the HBAO range, prevents shadowing of very far objects which are close in screen space.

//AMBIENT OCCLUSION - SSGI
#define iSSGISamples			9		//[5 to 24] Amount of SSGI sampling iterations, higher means better GI but less performance.
#define fSSGISamplingRange 		0.4		//[5.0 to 80.0] Radius of SSGI sampling.
#define fSSGIIlluminationMult 		4.5		//[1.0 to 8.0] Multiplier of SSGI illumination (color bouncing/reflection).
#define fSSGIOcclusionMult 		0.8		//[1.0 to 10.0] Multiplier of SSGI occlusion.
#define fSSGIModelThickness 		10.0		//[0.5 to 100.0] Amount of unit spaces the algorithm assumes the model's thickness. Lower if scene only contains small objects.
#define fSSGISaturation 		1.8		//[0.2 to 2.0] Saturation of bounced/reflected colors.

#define AO_ToggleKey     		RFX_ToggleKey

/*==============================================================================*/

//DEPTH OF FIELD - GLOBAL PARAMETERS
#define DOF_METHOD			4		//[1 to 4] 1: Ring DOF(Petka/martinsh) 2: Magic DOF 3: GP65CJ042 DOF 4: Matso DOF
#define DOF_FOCUSPOINT	 		float2(0.5,0.5)	//[0.0 to 1.0] Screen coordinates of focus point. First value is horizontal, second value is vertical position. 0 is left/upper, 1 is right/lower.
#define DOF_NEARBLURCURVE 		0.9		//[0.4 to X] Power of blur of closer-than-focus areas.
#define DOF_FARBLURCURVE 		1.5		//[0.4 to X] Elementary, my dear Watson: Blur power of areas behind focus plane.
#define DOF_BLURRADIUS 			15.0		//[5.0 to 50.0] Blur radius approximately in pixels. Radius, not diameter.
#define DOF_MANUALFOCUS   		1		//[0 or 1] Enables manual focus. 	
#define DOF_MANUALFOCUSDEPTH 		0.095		//[0.0 to 1.0] Manual focus depth. 0.0 means camera is focus plane, 1.0 means sky is focus plane.
#define DOF_VIGNETTE			400		//[0 to 1000] Significance of near DoF at edges

//DEPTH OF FIELD - RING DOF
#define iRingDOFSamples   		6  		//[5 to 30] Samples on the first ring. The other rings around have more samples
#define iRingDOFRings   		4  		//[1 to 8] Ring count
#define fRingDOFThreshold  		2.5 		//[0.8 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define fRingDOFGain   			0.1 		//[0.1 to 2.0] Amount of brightening for pixels brighter than threshold.
#define fRingDOFBias    		0.0 		//[0.1 to 2.0] bokeh bias.
#define fRingDOFFringe   		0.5 		//[0.0 to 1.0] Amount of chromatic abberation

//DEPTH OF FIELD - MAGIC DOF
#define iMagicDOFBlurQuality 		2		//[1 to 30] Blur quality as control value over tap count. Quality 15 produces 721 taps, impossible with other DOF shaders by far, most they can do is about 150.
#define fMagicDOFColorCurve 		3.0		//[1.0 to 10.0] DOF weighting curve.

//DEPTH OF FIELD - GP65CJ042 DOF
#define	iGPDOFQuality 			6		//[0 to 7] 0: only slight gaussian farblur but no bokeh. 1-7 bokeh blur, higher means better quality of blur but less fps. 
#define bGPDOFPolygonalBokeh 		1		//[0 or 1] Enables polygonal bokeh shape, e.g. POLYGON_NUM 5 means pentagonal bokeh shape. Setting this value to 0 results in circular bokeh shape.
#define	iGPDOFPolygonCount 		5		//[3 to 9] Controls the amount pf polygons for polygonal bokeh shape. 3 = triangular, 4 = square, 5 = pentagonal etc.	
#define	fGPDOFBias 			0.0 		//[0.0 to 20.0] Shifts bokeh weighting to bokeh shape edge. Set to 0 for even bright bokeh shapes, raise it for darker bokeh shapes in center and brighter on edge.
#define	fGPDOFBiasCurve 		0.0		//[0.0 to 3.0] Power of Bokeh Bias. Raise for more defined bokeh outlining on bokeh shape edge.
#define	fGPDOFBrightnessThreshold 	1.8		//[0.6 to 2.0] Threshold for bokeh brightening. Above this value, everything gets much much brighter. 1.0 is maximum value for LDR games like GTASA, higher values work only on HDR games like Skyrim etc.
#define	fGPDOFBrightnessMultiplier 	2.0 		//[0.0 to 2.0] Amount of brightening for pixels brighter than fGPDOFBrightnessThreshold.
#define	fGPDOFChromaAmount 		0.0		//[0.00 to 0.4] Amount of color shifting applied on blurred areas. 

//DEPTH OF FIELD - MATSO DOF
#define bMatsoDOFChromaEnable		1		//[0 or 1] Enables Chromatic Abberation.
#define bMatsoDOFBokehEnable		1		//[0 or 1] Enables Bokeh weighting do define bright light spots and increase bokeh shape definiton.	
#define fMatsoDOFChromaPow		1.4		//[0.2 to 3.0] Amount of chromatic abberation color shifting.
#define fMatsoDOFBokehCurve		8.0		//[0.5 to 20.0] Bokeh curve.
#define fMatsoDOFBokehLight		0.012 		//[0.0 to 2.0] Bokeh brightening factor.
#define iMatsoDOFBokehQuality		2		//[1 to 10] Blur quality as control value over tap count.
#define fMatsoDOFBokehAngle		0		//[0 to 360] Rotation angle of bokeh shape.

#define DoF_ToggleKey     		RFX_ToggleKey

/*==============================================================================*\
|                      EFFECT PARAMETERS - IMAGE ENHANCEMENTS                    |
\*==============================================================================*/

//HEAT HAZE
#define fHeatHazeSpeed  		2.0		//[0.5 to 10.0] Speed of heathaze waves
#define fHeatHazeOffset 		5.0		//[0.5 to 20.0] Amount of image distortion caused by heathaze effect
#define fHeatHazeTextureScale 		1.0		//[0.5 to 5.0] Scale of source texture, affecting the tile size. Use Heathaze debug effect for better visible effect.
#define fHeatHazeChromaAmount 		0.6 		//[0.0 to 2.0] Amount of color shift caused by heat haze. Linearly scales with fHeatHazeOffset.
#define bHeatHazeDebug			0		//[0 or 1] Enables raw texture output for debugging purposes. Useful for texture experiments.

#define HeatHaze_ToggleKey     		RFX_ToggleKey

//FISHEYE, CHROMATIC ABBERATION
#define fFisheyeZoom			0.51   		//[0.5 to 1.0] some lens zoom to hide bugged edges due to texcoord modification
#define fFisheyeDistortion	 	0.10  		//[-0.3 to 0.3] distortion of image, fish eye effect
#define fFisheyeDistortionCubic		0.0		//[-0.3 to 0.3] distortion of image, fish eye effect, cube based
#define fFisheyeColorshift		-0.03   	//[-0.1 to 0.1] Amount of color shifting

#define FishEye_ToggleKey     		RFX_ToggleKey